<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<?php include(DDROOTPATH.'/cache/title/'.$pagetag.'_title.php');?>

<link href="template/<?=MOBAN?>/css/style.css" rel="stylesheet" type="text/css" />
<link href="template/<?=MOBAN?>/css/layout.css" rel="stylesheet" type="text/css" />
<link href="template/<?=MOBAN?>/css/comm.css" rel="stylesheet" type="text/css" />
<link href="template/<?=MOBAN?>/css/mall.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="template/<?=MOBAN?>/js/jquery-1.3.2.min.js"></script>
<SCRIPT type="text/javascript" src="template/<?=MOBAN?>/js/function.js"></SCRIPT>
<SCRIPT type="text/javascript" src="js/jquery.colorbox.js"></SCRIPT>
<script language="javascript">
$.ajaxSetup ({
    cache: false //关闭AJAX相应的缓存
});
$(function(){
	$(".cxxq").colorbox({ innerWidth:700, innerHeight:450, iframe:true});
});

function saveComment(){
	    var fen = $('#qualityScore').val();
	    var comment = $('#comment').val();
	    if(comment==''){alert('您还没填写评论内容！')}
	    else {
	        $.post('ajax.php?fun=mall_comment', {'fen':fen,'comment':comment,'mall_name':'<?=$mall['name']?>','mall_id':'<?=$mall['id']?>', 'fresh':Math.random()}, function(data){//$('#comment').val(data);
			    if(data=='error1'){
				    alert('您今天已经评论过了！');
				}
				else if(data=='error2'){
				    alert('成功购物后才可评论！');
				}
				else{
				    alert('评论成功');
			        $("#mall_comment").prepend(data);
					$('#commenthide').show('slow');
				}
	        });
	    }
	    return false;
	}

function imgAuto(img, maxW, maxH) {
	var oriImg = document.createElement("img");
	oriImg.onload = function(){
		if (oriImg.width == 0 || oriImg.height == 0)
			return;
		var oriW$H = oriImg.width / oriImg.height;
		// var maxW$H = maxW / maxH;

		if (oriImg.height > maxH) {
			img.height = maxH;
			// img.removeAttribute("width");
			img.width = maxH * oriW$H;
		}
		if (img.width > maxW) {
			img.width = maxW;
			// img.removeAttribute("height");
			img.height = maxW / oriW$H;
		}

		if (maxH) {// if it defined the maxH argument
			if (img.height > 0)
				img.style.marginTop = (maxH - img.height) / 2 + "px";
		}
	};
	oriImg.src = img.src;
}

      qualityDwsc = new Array();
      qualityDwsc[1] = '别跟我提<?=$mall['name']?>，谁提我跟谁急';
      qualityDwsc[2] = '有那么一点小失望';
      qualityDwsc[3] = '还行吧，没什么值得说的';
      qualityDwsc[4] = '不错不错，不错不错';
      qualityDwsc[5] = '这地方太好了，下次一准还在这里买';
      function setstar(val, o, flag) {
        var x = document.getElementById(o);
        x.innerHTML = "";
        var i = 1;
        if (val < 3) {
          for (; i <= val; i++) {
            x.innerHTML = x.innerHTML + ('<div class="pl_11_xx" style="cursor:pointer" onmouseover="setdesc(' + i + ',\'' + o + '\',1)" onmouseup="setstar(' + i + ',\'' + o + '\',1)" ><img src="template/<?=MOBAN?>/images/i_395.jpg" width="24" height="23" /></div>');
          }
        } else {
          for (; i <= val; i++) {
            x.innerHTML = x.innerHTML + ('<div class="pl_11_xx" style="cursor:pointer" onmouseover="setdesc(' + i + ',\'' + o + '\',1)" onmouseup="setstar(' + i + ',\'' + o + '\',1)" ><img src="template/<?=MOBAN?>/images/i_394.jpg" width="24" height="23" /></div>');
          }
        }
        for (var j = i; j <= 5; j++) {
          var html = x.innerHTML;
          x.innerHTML = x.innerHTML + ('<div class="pl_11_xx" style="cursor:pointer" onmouseover="setdesc(' + j + ',\'' + o + '\',1)"  onmouseup="setstar(' + j + ',\'' + o + '\',1)"><img src="template/<?=MOBAN?>/images/i_396.jpg" width="24" height="23" /></div>');
        }
        $('#qualityScore').val(val);
      }
	  function setdesc(val, o) {
        $('#' + o + '_desc').html(qualityDwsc[val]);
      }
    </script>
</head>

<body>
<?php
$modtag="malllist";
include("head_shop.tpl.php");
?>
<div id="Content">
<div class="clears"></div>
    <div class="Shop_introduced">
      <div class="uInfoTop" style="width:750px">
         <div class="break"><a href="javascript:void();" onclick="javascript:window.history.back();"><img src="template/<?=MOBAN?>/images/back.gif" width="29" height="30" border="0" /></a></div>
         <div class="username usernamefont"><?=$mall['name']?>（<?=$mall['url']?>）</div>
      </div>
      <div class="usertopline" style="width:750px"></div>
      
      <div class="storeIMG" style="width:234px;height:233px"><div class="mallpic"><img src="<?=$mall['logo']?>" width="170" height="80" /></div></div>
      <div class="text_introduced">
      <h3 class="name"><?=$mall['name']?></h3>
      <p><?=$mall['des']?></p>
      <h3 class="cost">消费1元最高返<span class="HighlightRed"><?=$mall['fan']?></span>米</h3>
      <ul class="buybutton">
        <?php if($mall['hdfk']=='是'){?>
        <li style="width:74px"><img src="template/<?=MOBAN?>/images/Standard1.gif" width="56" height="56" /></li>
        <?php } if($mall['zgfp']=='是'){?>
        <li style="width:74px"><img src="template/<?=MOBAN?>/images/Standard2.gif" width="56" height="56" /></li>
        <?php } if($mall['yfzc']=='是'){?>
        <li style="width:74px"><img src="template/<?=MOBAN?>/images/Standard3.gif" width="56" height="56" /></li>
        <?php }?>
        <li class="r" style="float:right"><a target="_blank" href="gotomall.php?act=mall&id=<?=$mall['id']?>"><img src="template/<?=MOBAN?>/images/buybutton.gif" width="195" height="56" /></a></li>
      </ul>
    </div>
    <div class="clears"></div>
    <div class="shopdetail clearfix">
      <ul class="title clearfix">
        <li <?php if($act=='fxsm'){?> class="hover"<?php }?>><a href="mall<?=$url_head_id?><?=$mall['id']?><?=$url_head_act?>fxsm<?=$url_end?>">店铺介绍</a></li>
        <!--<li <?php if($act=='cxyh'){?> class="hover"<?php }?>><a href="mall<?=$url_head_id?><?=$mall['id']?><?=$url_head_act?>cxyh<?=$url_end?>">订单活动</a></li>-->
      </ul>
    <!--
    //米票活动，暂时无用
    <div class="shopdetailmain clearfix">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" align="left">
      <tr>
        <td width="85" align="center" class="title">活动名称</td>
        <td width="147" class="title"></td>
        <td width="78" align="center" class="title"> 商品价格/元</td>
        <td width="108" align="center" class="title"> 每人得米</td>
        <td width="55" align="center" class="title">数量限制</td>
        <td width="127" align="center" class="title">状态</td>
        <td width="150" align="center" class="title">有效时间</td>
      </tr>
      <tr>
        <td class="padT10"><img src="images/activename.gif" width="68" height="67" /></td>
        <td class="padT10">2011年暴红款款激情夏日<br />促销仅需199元</td>
        <td align="center" class="padT10">200</td>
        <td align="center" class="padT10"><span class="ColorRed">200</span></td>
        <td align="center" class="padT10">1000</td>
        <td align="center" class="padT10"><span class="ColorRed">进行中</span></td>
        <td>2011-05-18 21:22:09<br />2011-05-18 21:22:09</td>
      </tr>
      <tr>
        <td colspan="7" class="padT10">兑换规则：消费1元获得<span class="HighlightRed">2</span>米<br />备注：活动的解释权归店铺所有，如果有任何疑问，请及时联系我们。</td>
      </tr>
      <tr><td colspan="7" class="padT10"><div class="line"></div></td></tr>
    </table>
    </div>
    --> 
    <?php if($act=='cxyh'){?>
    <?php foreach($activity as $row){?>
   <!--<div class="item">
       <div class="line">
          <div class="picfm"><a target="_blank" href="gotomall.php?act=cuxiao&id=<?=$row['id']?>" title="<?=$row['name']?>"><img  onload="imgAuto(this,68,68);"  src="<?=$row['pic']?>" /></a></div>
          <div class="txt" style="margin-left:10px;display:inline"><a target="_blank" href="gotomall.php?act=cuxiao&id=<?=$row['id']?>"><?=$row['name']?></a></div>
 		  <div class="txt" style="margin-left:10px;display:inline">活动规则：提交订单即得米</div>	     
       </div>
       <div class="line" style="margin-top:5px;height:auto">
          <div class="txt">兑换规则：消费1元获得<font style="font-size:18px;color:#F00">2</font>米 </div>
 		  <div class="txt" style="margin-top:5px">所属商家：<a style="color:#F00; text-decoration:underline"><?=$row['mallname']?></a></div>	  
          <div class="txt" style="margin-top:5px">状态：<?=sjc(date('Y-m-d'),$row['etime'])?></div>	
          <div class="txt" style="margin-top:5px">活动时间：<?=$row['stime']?>至<?=$row['etime']?>（<?=sjc(date('Y-m-d'),$row['etime'])?>）</div>	
          <div class="txt" style="margin-top:5px">活动简介：<?=$row['des']?></div>	
       </div>
    </div>-->
    <?php }}?>    
    <div class="clears"></div>
    
    <?php if($act=='fxsm'){?>
    <!--<div class="shopdetailmain">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" align="left">
      <tr><td class="Font14"><?=str_replace('../../upload','upload',$mall['js'])?></td></tr>
    </table>
    </div>-->
    <div class="item" style="height:auto;border:0">
		<font class="Font14"><?=str_replace('../../upload','upload',$mall['js'])?></font>
    </div>    
    <?php }?> 
   </div>
  </div>
    
    <div class="Shop_introducedR">
    <div class="shopINFO" style="border-bottom:#CCC solid 1px;height:312px">
        <h3>店铺信息</h3>
        <p><img src="template/<?=MOBAN?>/images/baozheng.gif" width="174" height="46" class="baozheng"/></p>
        <p>经营类型：<strong><?=$malltype?></strong><br />
          店铺编号：<strong>HG95348</strong></p>
        <div class="rzframe">
         <?php if($mall["renzheng"]=='on'){?>
         <div class="ico"><img src="template/<?=MOBAN?>/images/rz_netshop.gif" width="57" height="56" /></div>
         <?php }?>
        </div> 
    </div>
    <div class="shopNOTICE" style="margin-top:10px">
    <h3>店铺公告</h3>
    <p>暂无</p>
    </div>
    <div class="shopCONTACT">
    <h3>联系方式</h3>
    <p>暂无</p>
    </div>
    </div>
    
    </div>
    
<div class="lineclear"></div>
<?php 
	include ("footer.tpl.php");
?>
</body>
</html>
